let name = '刘老板';
function showName() {
  console.log(name); // undefined
  if (true) { // 块级作用域
    let name = ' 大厂苗';
    console.log(name)
  }
  console.log(name); // undefined
}

showName();